package com.example.wechat

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.ContentFrameLayout
import kotlinx.android.synthetic.main.item_chat.*

class UpFragment : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        return inflater.inflate(R.layout.fragment_up,container,false)
    }
    class ChatFragment : Fragment(){
        override fun onCreateView(
            inflater: LayoutInflater,
            container: ViewGroup?,
            savedInstanceState: Bundle?
        ): View? {
            return inflater.inflate(R.layout.layout_chat,container,false)
        }
        fun refresh(head_img:Int,msg:String,time:String,name:String)
        {
            ContentFrameLayout.VISIBLE
            chat_img_frihead.setImageResource(head_img)
            chat_text_fri_lastmsg.text=msg
            chat_text_fri_lastime.text=time
            chat_text_fri_name.text=name
        }
    }
    class PuqFragment : Fragment(){
        override fun onCreateView(
            inflater: LayoutInflater,
            container: ViewGroup?,
            savedInstanceState: Bundle?
        ): View? {
            return inflater.inflate(R.layout.puq_layout,container,false)
        }
    }
    class FriendsFragment : Fragment(){
        override fun onCreateView(
            inflater: LayoutInflater,
            container: ViewGroup?,
            savedInstanceState: Bundle?
        ): View? {
            return inflater.inflate(R.layout.friends_layout,container,false)
        }
    }
    class MeFragment : Fragment(){
        override fun onCreateView(
            inflater: LayoutInflater,
            container: ViewGroup?,
            savedInstanceState: Bundle?
        ): View? {
            return inflater.inflate(R.layout.me_layout,container,false)
        }
    }



}